from django.conf.urls import include, url
from django.contrib import admin
admin.autodiscover()
#from palmgo.datetime_view import hours_ahead
from palmgo.view import index,download_interface,fault_total,cover,source_hot,ribao,ribao_backend,ribao_mailsend
from palmgo.view import weixin,weixin_sdk,total_restart,source_show,zabbix_alerts,taxi_all_show
from palmgo.view import login_user,logout_user,city_interface,totle_interface,taxi_table,taxi_show,huoyun_show,keyun_show
from palmgo.view import event_inter_show,backupfile_show,source_show_perm,source_show_pic,updowncars,help
from django.views.decorators.cache import cache_page
from django.conf import settings

urlpatterns = [
    # url(r'^form_components',form_components),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^event_inter_show',event_inter_show),
    url(r'^zabbix_alerts',zabbix_alerts),
    url(r'^sdk',weixin_sdk),
    url(r'^weixin',weixin),
    url(r'^help',help),
    url(r'^total_restart/$',total_restart),
    url(r'^ribao/$',ribao),
    url(r'^ribao_backend/$',ribao_backend),
    url(r'^ribao_mailsend/$',ribao_mailsend),
    url(r'^source_hot/$',source_hot),
    url(r'^city_interface/$',city_interface),
    url(r'^index/$',index),
    url(r'^backupfile_show/$',backupfile_show),
    url(r'^source_show/$',source_show),
    url(r'^updowncars/$',updowncars),
    url(r'^source_show_pic/$',source_show_pic),
    url(r'^source_show_perm/$',source_show_perm),
    url(r'^cover/$',cover),
    url(r'^download_interface/$',download_interface),
    url(r'^totle_interface/$',totle_interface),
    url(r'^taxi_table/$',taxi_table),
    url(r'^taxi_show/$',taxi_show),
    url(r'^huoyun_show/$',huoyun_show),
    url(r'^taxi_all_show/$',taxi_all_show),
    url(r'^keyun_show/$',keyun_show),
    url(r'^fault_total/$',fault_total),
    url(r'^fault_total/$',fault_total),
    #url(r'^agent1/download/(?P<path>.*)$', 'django.views.static.serve', {'document_root': abc, 'show_indexes':True}),
    url(r'^logout/', logout_user),
#    url(r'time/plus/(\d{1,2})/$',hours_ahead),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^login/$', login_user),
    url(r'^bootstrap/(?P<path>.*)$','django.views.static.serve', {'document_root':settings.MEDIA_ROOT,}),
    url(r'^static/(?P<path>.*)$','django.views.static.serve', {'document_root':settings.STATIC_ROOT,}),
    url(r'^.+/$', login_user),
    url(r'^$',login_user ),
]
